import socket

sk = socket.socket()
sk.bind(("0.0.0.0", 7777))
sk.listen(5) # 可以连接几个客户端
client, addr = sk.accept()
print(client, addr)
while True:
    accept_data = client.recv(1024)
    print("服务器收到客户端的消息：", accept_data.decode("utf-8"))
    client.send("收到了".encode("utf-8"))
